<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>用户消息管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" th:href="@{/static/layui/css/layui.css}" media="all"/>
    <link rel="stylesheet" th:href="@{/static/admin/css/list.css}" media="all"/>
</head>
<body class="childrenBody">
<fieldset class="layui-elem-field">
    <legend>消息检索</legend>
    <div class="layui-field-box">
        <form class="layui-form">
            <div class="layui-inline">
                <input type="text" value="" name="s_key" placeholder="可以输入消息名" class="layui-input search_input">
            </div>
            <div class="layui-input-inline">
                <a class="layui-btn" lay-submit="" lay-filter="searchForm">查询</a>
            </div>
            <shiro:hasPermission name="user:message:add">
                <div class="layui-inline">
                    <a class="layui-btn layui-btn-normal" data-type="addMessage">发送消息</a>
                </div>
            </shiro:hasPermission>
            <shiro:hasPermission name="user:message:add">
                <div class="layui-inline">
                    <a class="layui-btn layui-btn-danger" data-type="lookSome">批量已读</a>
                </div>
            </shiro:hasPermission>
            <shiro:hasPermission name="user:message:delete">
                <div class="layui-inline">
                    <a class="layui-btn layui-btn-danger" data-type="deleteSome">批量删除</a>
                </div>
            </shiro:hasPermission>

        </form>
    </div>
</fieldset>

<div class="layui-form users_list">
    <table class="layui-table" id="message-table" lay-filter="messageList"></table>
    <script type="text/html" id="formatLock">
        {{#  if( d.looked == "已读"){ }}
        <span class="layui-badge layui-bg-gray">已读</span>
        {{#  } else { }}
        <span class="layui-badge layui-bg-green">未读</span>
        {{#  } }}

    </script>
    <script type="text/html" id="messageBar">
        <shiro:hasPermission name="user:message:edit">
            <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
        </shiro:hasPermission>
        <shiro:hasPermission name="user:message:add">
            <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">已读</a>
        </shiro:hasPermission>
        <shiro:hasPermission name="user:message:delete">
            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
        </shiro:hasPermission>
    </script>

</div>
<div id="page"></div>



<script type="text/javascript" th:src="@{/static/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/static/admin/js/tools.js}"></script>
<script type="text/javascript" th:src="@{/static/admin/js/message/messageList.js}"></script>
</body>

</html>